//
//  intenseViewController.m
//  iSeeColor
//
//  Created by Alberto Rivera on 11/2/12.
//  Copyright (c) 2012 Wyatt Gosling. All rights reserved.
//

#import "intenseViewController.h"

@interface intenseViewController ()

@end

@implementation intenseViewController
@synthesize mySlider;

- (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil
{
    self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil];
    if (self) {
        // Custom initialization
    }
    return self;
}

- (void)viewDidLoad
{
    [super viewDidLoad];
    
    //instantiate a NSUserDefaults container and update the sliders value.
    NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults];
    Slidey.value = [defaults floatForKey:@"intensity"]/1.5;
    
	// Do any additional setup after loading the view.
}

- (void)viewDidUnload
{
    [super viewDidUnload];
    // Release any retained subviews of the main view.
}

- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation
{
    return (interfaceOrientation == UIInterfaceOrientationPortrait);
}

- (IBAction) sliderValueChanged:(UISlider *)sender
{
    NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults];
    float intense = sender.value*1.5;
    [defaults setFloat:intense forKey:@"intensity"];
}

@end
